// Learn TypeScript:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/typescript.html
// Learn Attribute:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html

const { ccclass, property } = cc._decorator;

@ccclass
export default class FitWidthCamera extends cc.Component {


    // LIFE-CYCLE CALLBACKS:

    onLoad() {
        // cc.view.setViewportInPoints(0, 0, 400, 500);
        // cc.view.setResolutionPolicy(cc.ResolutionPolicy.SHOW_ALL);
    }

    start() {
        // cc.log(cc.winSize)
        // let size = cc.view.getFrameSize();
        // let dSize = cc.view.getDesignResolutionSize();

        // cc.view.setFrameSize(size.width, (size.width / dSize.width) * dSize.height);

        // cc.log("canvas size", cc.view.getCanvasSize());
        // cc.log("frame size", cc.view.getFrameSize());
        // cc.view.setFrameSize(size.width, size.height);
        // cc.log("frame size", cc.view.getFrameSize());
        // cc.log("platform", cc.sys.platform);
        // cc.log("os", cc.sys.os);
    }

    // update (dt) {}
}
